@file:Suppress("unused")

package com.example.demo.model.blog

import xyz.erupt.annotation.*
import xyz.erupt.annotation.sub_field.*
import xyz.erupt.annotation.sub_field.sub_edit.*
import xyz.erupt.jpa.model.*
import javax.persistence.*

@Erupt(name = "博客类别", desc = "sort")
@Table(name = "blog_category")
@Entity
class BlogCategory : BaseModel() {

    @EruptField(
        views = [View(title = "名称")],
        edit = Edit(title = "名称", notNull = true, search = Search(vague = true)),
    )
    var name: String = ""

    @EruptField(
        views = [View(title = "顺序")],
        edit = Edit(title = "顺序", notNull = true),
    )
    var sort: Int = 0

    @EruptField(
        views = [View(title = "是否显示")],
        edit = Edit(title = "是否显示", notNull = true),
    )
    var isShow: Boolean = true

    @EruptField(
        views = [View(title = "分类介绍")],
        edit = Edit(title = "分类介绍", type = EditType.TEXTAREA),
    )
    var remark: String? = null

}